<.header>
  Listing Tags
  <:actions>
    <.link href={~p"/tags/new"}>
      <.button>New Tag</.button>
    </.link>
  </:actions>
</.header>

<.table id="tags" rows={@tags} row_click={&JS.navigate(~p"/tags/#{&1}")}>
  <:col :let={tag} label="Name"><%= tag.name %></:col>
  <:action :let={tag}>
    <div class="sr-only">
      <.link navigate={~p"/tags/#{tag}"}>Show</.link>
    </div>
    <.link navigate={~p"/tags/#{tag}/edit"}>Edit</.link>
  </:action>
  <:action :let={tag}>
    <.link href={~p"/tags/#{tag}"} method="delete" data-confirm="Are you sure?">
      Delete
    </.link>
  </:action>
</.table>
